﻿//----------------------------------------------------------------
// Desc: INI文件写入
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2011-05-06
//
// Update Date : 
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once

FINLINE void IFINIW::WriteMuster (const NCHAR* name)
{
#ifdef UNICODE
    WriteMusterW(name);
#else
    WriteMusterA(name);
#endif
}

FINLINE void IFINIW::WriteMusterA(const ACHAR* name)
{
    WriteMusterW(FStringW(name));
}

FINLINE void IFINIW::WriteString (const NCHAR* name, const NCHAR* v)
{
#ifdef UNICODE
    WriteStringW(name, v);
#else
    WriteStringA(name, v);
#endif
}

FINLINE void IFINIW::WriteStringA(const ACHAR* name, const ACHAR* v)
{
    WriteStringW(FStringW(name), FStringW(v));
}

FINLINE void IFINIW::WriteBool (const NCHAR* name, bool v)
{
#ifdef UNICODE
    WriteBoolW(name, v);
#else
    WriteBoolA(name, v);
#endif
}

FINLINE void IFINIW::WriteBoolA(const ACHAR* name, bool v)
{
    WriteBoolW(FStringW(name), v);
}

FINLINE void IFINIW::WriteInt (const NCHAR* name, int v)
{
#ifdef UNICODE
    WriteIntW(name, v);
#else
    WriteIntA(name, v);
#endif
}

FINLINE void IFINIW::WriteIntA(const ACHAR* name, int v)
{
    WriteIntW(FStringW(name), v);
}

FINLINE void IFINIW::WriteFloat (const NCHAR* name, float v)
{
#ifdef UNICODE
    WriteFloatW(name, v);
#else
    WriteFloatA(name, v);
#endif
}

FINLINE void IFINIW::WriteFloatA(const ACHAR* name, float v)
{
    WriteFloatW(FStringW(name), v);
}

FINLINE void IFINIW::WriteColor (const NCHAR* name, DWORD color)
{
#ifdef UNICODE
    WriteColorW(name, color);
#else
    WriteColorA(name, color);
#endif
}

FINLINE void IFINIW::WriteColorA(const ACHAR* name, DWORD color)
{
    WriteColorW(FStringW(name), color);
}

FINLINE void IFINIW::WriteRect (const NCHAR* name, RECT& rc)
{
#ifdef UNICODE
    WriteRectW(name, rc);
#else
    WriteRectA(name, rc);
#endif
}

FINLINE void IFINIW::WriteRectA(const ACHAR* name, RECT& rc)
{
    WriteRectW(FStringW(name), rc);
}

FINLINE void IFINIW::WriteFRect (const NCHAR* name, FRect& rc)
{
#ifdef UNICODE
    WriteFRectW(name, rc);
#else
    WriteFRectA(name, rc);
#endif
}

FINLINE void IFINIW::WriteFRectA(const ACHAR* name, FRect& rc)
{
    WriteFRectW(FStringW(name), rc);
}

FINLINE void IFINIW::WriteRemark (const NCHAR* remark)
{
#ifdef UNICODE
    WriteRemarkW(remark);
#else
    WriteRemarkA(remark);
#endif
}

FINLINE void IFINIW::WriteRemarkA(const ACHAR* remark)
{
    WriteRemarkW(FStringW(remark));
}
